import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home/index'//首页
import GoodsTypeList from '@/views/GoodsTypeList/index'//全部分类
import GoodsDetail from '@/views/GoodsTypeList/detail'//商品详情
import ShopCart from '@/views/ShopCart/index'//购物车
import OrderConfirmNow from '@/views/OrderConfirmNow/index'//立即购买确认订单页面
import OrderConfirm from '@/views/OrderConfirm/index' //购物车生成订单
import Center from '@/views/Center/index'//会员中心
import Address from '@/views/AddressList/index'//地址列表
import AddressDetail from '@/views/AddressList/detail'//地址详情
import OrderList from '@/views/OrderList/index'//订单
import ReturnGoodsList from '@/views/ReturnGoodsList/index'//退货
import Payment from '@/views/Payment/index'//支付页面
import payComplete from '@/views/Payment/payComplete'//支付成功
import orderDetail from '@/views/OrderList/orderDetail'//订单详情
import Refund from '@/views/OrderList/refund'//退款
import OrderDetailReturn from '@/views/OrderList/orderDetailReturn'//退货
import ReturnGoodsDetail from '@/views/ReturnGoodsList/detail'//退货详情
import MerchantOrderList from '@/views/MerchantOrderList/index'//被指派订单
import merchantOrderDetail from '@/views/MerchantOrderList/detail'//被指派订单详情
import MerchantReturnList from '@/views/MerchantReturnList/index' //退单列表
import merchantReturnDetail from '@/views/MerchantReturnList/detail' //退单商品详情
import BankList from '@/views/BankList/index'//银行卡列表
import bankAdd from '@/views/BankList/bankAdd'//添加银行卡
import Setting from '@/views/Setting/index'//设置
import MerchantAdd from '@/views/MerchantAdd/index'//加盟商认证
import Search from '@/views/Search/index'//加盟商认证

Vue.use(VueRouter)

const routes = [
  	{
		path: '/',
		name: 'Home',
		component: Home
	},
	{
		path: '/goodstypelist',
		name: 'GoodsTypeList',
		component: GoodsTypeList
	},
	{
		path:'/goodsdetail/:id',
		name:'GoodsDetail',
		component:GoodsDetail
	},
	{
		path: '/shopcart',
		name: 'ShopCart',
		component: ShopCart
	},
	{
		path:'/orderconfirmNow',
		name:'OrderConfirmNow',
		component:OrderConfirmNow
	},
	{
		path:'/center',
		name:'Center',
		component:Center
	},
	{
		path:'/address',
		name:'Address',
		component:Address
	},
	{
		path:'/address/detail/:id',
		name:'AddressDetail',
		component:AddressDetail
	},
	{
		path:'/center/orderlist/:id',
		name:'OrderList',
		component:OrderList
	},
	{
		path:'/center/ReturnGoodsList/:id',
		name:'ReturnGoodsList',
		component:ReturnGoodsList
	},
	{
		path:'/payment',
		name:'Payment',
		component:Payment
	},
	{
		path:'/center/orderlist/orderDetail/:id',
		name:'orderDetail',
		component:orderDetail
	},
	{
		path:'/center/orderlist/orderDetail/refund/:id',
		name:'Refund',
		component:Refund
	},
	{
		path:'/center/orderDetailReturn/:order_code/:index',
		name:'OrderDetailReturn',
		component:OrderDetailReturn
	},
	{
		path:'/center/returnGoodsList/returnGoodsDetail/:id/:mid/:goodid',
		name:'ReturnGoodsDetail',
		component:ReturnGoodsDetail
	},
	{
		path:'/orderConfirm',
		name:'OrderConfirm',
		component:OrderConfirm
	},
	{
		path:'/center/merchantCenter/merchantOrderList',
		name:'MerchantOrderList',
		component:MerchantOrderList
	},
	{
		path:'/center/merchantCenter/merchantReturnList',
		name:'MerchantReturnList',
		component:MerchantReturnList
	},
	{
		path:'/center/bankList',
		name:'BankList',
		component:BankList
	},
	{
		path:'/setting/:id',
		name:'Setting',
		component:Setting
	},
	{
		path:'/center/bankAdd/:id',
		name:'bankAdd',
		component:bankAdd
	},
	{
		path:'/center/merchantCenter/merchantOrderDetail/:id',
		name:'merchantOrderDetail',
		component:merchantOrderDetail
	},
	{
		path:'/center/merchantCenter/merchantReturnDetail/:id/:mid',
		name:'merchantReturnDetail',
		component:merchantReturnDetail
	},
	{
		path:'/center/MerchantAdd',
		name:'MerchantAdd',
		component:MerchantAdd
	},
	{
		path:'/search',
		name:'Search',
		component:Search
	},
	{
		path:'/payComplete',
		name:'payComplete',
		component:payComplete
	}
]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
